import { useState } from 'react';
import styles from './index.module.less';

const AntdWrapper = (props) => {
  const [focus, setFocus] = useState(false);

  return (
    <div
      className={`${styles.antdWrapper} ${
        focus ? styles.antdFormItemFocused : ''
      }`}
      onFocus={() => setFocus(true)}
      onBlur={() => setFocus(false)}
    >
      <div>{props.children}</div>
    </div>
  );
};

export default AntdWrapper;
